#ifndef CAIDAN1GROUPBUTTON_H
#define CAIDAN1GROUPBUTTON_H

#include <huanbutton.h>
#include <caidan1button.h>

namespace Ui {
class Caidan1GroupButton;
}

/*
 * huanbutton功能不够菜单1用
 */
class Caidan1GroupButton : public HuanButton
{
    Q_OBJECT

public:
    explicit Caidan1GroupButton ( QWidget* parent = 0 );
    ~Caidan1GroupButton();
    Caidan1GroupButton ( const Caidan1GroupButton& other );
    Caidan1GroupButton& operator = ( const Caidan1GroupButton& other );
    bool operator == ( const Caidan1GroupButton& other );

    QList<Caidan1Button*>& allCaidanButton();
    const QList<Caidan1Button*>& allCaidanButton() const;
    void setAllCaidanButton ( const QList<Caidan1Button*>& btnList );
    void insertCaidanButton ( int index, Caidan1Button* btn );
    void AddCaidanButton ( Caidan1Button* btn );
    //不能传引用，删不掉引用。
    void removeCaidanButton ( Caidan1Button* rming );

    void setBigGroup ( bool bigOne = false );
    void updateCaidanButton();

    //输入textSize自动设置iconSize
    //
    //void generateSize ( QFont font1, QFont font2 );

private:
    Ui::Caidan1GroupButton* ui;
    //换用指针
    QList<Caidan1Button*> btnList;
    bool bBigShow;
};

Q_DECLARE_METATYPE ( Caidan1GroupButton )

#endif // CAIDAN1GROUPBUTTON_H
